package com.yootk;
import java.io.*;
public class  YootkDemo_Reader{
    public static void main(String[] args) throws Exception {
        File file = new File("H:" + File.separator + "muyan" + File.separator + "vip" + File.separator + "yootk.txt"); // 文件路径
        if (file.exists()) {
            try (Reader in = new FileReader(file)) {
                char data[] = new char[1024]; // 对象实例化
                // 读取数据到字符数组，随后返回读取到的数据长度 // 开辟字符数组
                int len = in.read(data);
                System.out.println(new String(data, 0, len)); // 字符数组转为字符串
            } catch (Exception e) {}
        }
    }
}
